package qc.module.qms.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.qms.dto.pointdata.QmsPointNumericDataDto;
import qc.module.qms.dto.pointdata.QmsPointRealNumericDataDto;
import qc.module.qms.entity.*;

import java.util.List;

/**
 * QmsPointNumericDataMapper
 *
 * @author QuCheng Tech
 * @since 2025/9/24
 */
@Mapper
public interface QmsPointNumericDataMapper {
    QmsPointNumericDataMapper MAPPER = Mappers.getMapper(QmsPointNumericDataMapper.class);

    /**
     * 实时点号数据Entity转换为DTO
     *
     * @param en 实时点号数据Entity
     * @return qc.module.qms.dto.pointdata.QmsPointRealNumericDataDto
     * @author QuCheng Tech
     * @since 2025/9/24
     */
    QmsPointRealNumericDataDto realEntityToDto(QmsPointRealNumericData en);

    List<QmsPointRealNumericDataDto> realEntitiesToDtoList(List<QmsPointRealNumericData> ens);

    @Mapping(target = "beginv", ignore = true)
    @Mapping(target = "endv", ignore = true)
    @Mapping(target = "maxv", ignore = true)
    @Mapping(target = "maxtm", ignore = true)
    @Mapping(target = "minv", ignore = true)
    @Mapping(target = "mintm", ignore = true)
    QmsPointNumericDataDto realEntityToPointDto(QmsPointRealNumericData en);

    List<QmsPointNumericDataDto> realEntitiesToDtoPointList(List<QmsPointRealNumericData> ens);

    /**
     * 小时及以上时段点号数据Entity转换为DTO
     *
     * @param en 点号数据Entity
     * @return qc.module.qms.dto.pointdata.QmsPointNumericDataDto
     * @author QuCheng Tech
     * @since 2025/9/24
     */
    QmsPointNumericDataDto entityToDto(QmsPointNumericData en);

    List<QmsPointNumericDataDto> entitiesToDtoList(List<QmsPointNumericData> ens);

    QmsPointNumericDataDto hourEntityToDto(QmsPointHourNumericData en);

    List<QmsPointNumericDataDto> hourEntitiesToDtoList(List<QmsPointHourNumericData> ens);

    QmsPointNumericDataDto dayEntityToDto(QmsPointDayNumericData en);

    List<QmsPointNumericDataDto> dayEntitiesToDtoList(List<QmsPointDayNumericData> ens);

    QmsPointNumericDataDto weekEntityToDto(QmsPointWeekNumericData en);

    List<QmsPointNumericDataDto> weekEntitiesToDtoList(List<QmsPointWeekNumericData> ens);

    QmsPointNumericDataDto tendaysEntityToDto(QmsPointTendaysNumericData en);

    List<QmsPointNumericDataDto> tendaysEntitiesToDtoList(List<QmsPointTendaysNumericData> ens);

    QmsPointNumericDataDto monthEntityToDto(QmsPointMonthNumericData en);

    List<QmsPointNumericDataDto> monthEntitiesToDtoList(List<QmsPointMonthNumericData> ens);

    QmsPointNumericDataDto quarterEntityToDto(QmsPointQuarterNumericData en);

    List<QmsPointNumericDataDto> quarterEntitiesToDtoList(List<QmsPointQuarterNumericData> ens);

    QmsPointNumericDataDto yearEntityToDto(QmsPointYearNumericData en);

    List<QmsPointNumericDataDto> yearEntitiesToDtoList(List<QmsPointYearNumericData> ens);
}
